package net.wofly.sale.order.domain;


import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.wofly.right.domain.ReceivingAddr;

/**
 * 订单收货地址
 * <p>
 * <ul>
 * <li>从客户的收货地址中取，选取默认，没有默认选第一个。</li>
 * <li></li>
 * </ul>
 *
 * @author lign
 * @version 1.0
 * @created 26-11月-2017 11:32:52
 */
@Data
@Entity
@Table(name = "sale_order_orderreceivingaddr")
@ApiModel(description = "订单收货地址")
public class OrderReceivingAddr {
    
    @Id
    private String orderReceivingAddrID;
    
    private Long modifyDate;
    /**
     * 存放订单ID
     */
//    @OneToOne(cascade=CascadeType.ALL)
//    @JoinColumn(name="Id")   
//    private Order order;
    private String orderID ;
    
    @ApiModelProperty(value = "收货地址ID", required = true)
    private String receivingAddrID;
    
    @Transient
    private ReceivingAddr receivingAddr;
    
    
    public OrderReceivingAddr() {
    
    }
    @Override
    public void finalize() throws Throwable {
    
    }
}